<template>
    <div class="label">
       <div class="txt" >
            <span class="sub">
                {{label}}
            </span>
            <h2 v-if="isShowImg">{{num}}</h2>
            <span v-else class="sub">{{ num }}</span>
       </div>

       <img v-if="isShowImg" :src="img" alt="" :style="{width: `${imgWidth || 60}px`}">
    </div>
</template>
<script setup lang="ts">
import {LabelInfo} from '@/models/home/main'
import {defineProps} from 'vue'

defineProps<LabelInfo>()

</script>

<style scoped land="css">

.label {
    display: flex;
    align-items:center;
    margin-left: 10px;
    margin-right: 10px;
}
.txt {
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;

}
.label .txt > h2 {
  font-size: 24px;
  color: #fff;
  margin-top: 10px
}
.label img {
    width:82px;
    margin-left: 30px;
}
.txt .sub{
    font-size: 16px
}
</style>